-- GENERATED SPELL FOR [Death's Head Necromancer] --


function spell0_7337(pUnit, Event) --@Bone Armor,Self--
pUnit:FullCastSpellOnTarget(11445,pUnit)
pUnit:RegisterEvent('Sorts_7337', 0, 1)
end

function spell1_7337(pUnit, Event) --@Cripple,n/a--
pUnit:FullCastSpellOnTarget(11443,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7337', 18000, 1)
end

function spell2_7337(pUnit, Event) --@Shackle Undead,n/a--
pUnit:FullCastSpellOnTarget(11444,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7337', 22000, 1)
end

function spell3_7337(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(9613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7337', 3000, 1)
end

function spell4_7337(pUnit, Event) --@Summon Skeletal Servant,Self--
pUnit:FullCastSpellOnTarget(12420,pUnit)
pUnit:RegisterEvent('Sorts_7337', 629, 1)
end

function Sorts_7337(pUnit, Event)
local choix_sorts_7337 = math.random(0, 4)
if choix_sorts_7337 == 0 then
pUnit:RegisterEvent('spell0_7337', 1, 1)
end
if choix_sorts_7337 == 1 then
pUnit:RegisterEvent('spell1_7337', 1, 1)
end
if choix_sorts_7337 == 2 then
pUnit:RegisterEvent('spell2_7337', 1, 1)
end
if choix_sorts_7337 == 3 then
pUnit:RegisterEvent('spell3_7337', 1, 1)
end
if choix_sorts_7337 == 4 then
pUnit:RegisterEvent('spell4_7337', 1, 1)
end
end

function mob7337_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_7337', math.random(1500, 3000), 1)
end

function mob7337_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7337_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7337_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(7337, 1, 'mob7337_Action')
RegisterUnitEvent(7337, 2, 'mob7337_Leave')
RegisterUnitEvent(7337, 3, 'mob7337_Kill')
RegisterUnitEvent(7337, 4, 'mob7337_Die')
